package cn.shengongying.service.impl;

import cn.shengongying.dao.BossCompanyInfoMapper;
import cn.shengongying.model.BossCompanyInfo;
import cn.shengongying.service.IBossCompanyInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 雇主公司信息(招聘信息中公司信息)管理 服务实现类
 * </p>
 *
 * @author RXK
 * @since 2022-01-05
 */
@Service
public class BossCompanyInfoServiceImpl extends ServiceImpl<BossCompanyInfoMapper, BossCompanyInfo> implements IBossCompanyInfoService {

    private final BossCompanyInfoMapper companyInfoMapper;

    public BossCompanyInfoServiceImpl(BossCompanyInfoMapper companyInfoMapper) {
        this.companyInfoMapper = companyInfoMapper;
    }

    @Override
    public void insert(BossCompanyInfo companyInfo) {
        companyInfoMapper.insert(companyInfo);
    }

    @Override
    public BossCompanyInfo findByBoss(Long userId) {
       return companyInfoMapper.findOne(userId);
    }

    @Override
    public void create(BossCompanyInfo companyInfo) {
        companyInfoMapper.createNew(companyInfo);
    }
}
